package com.xsr.controller;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.xsr.pojo.User;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 邢式瑞
 * @version 1.0
 * @project gp14Sm
 * @date 2022/9/9 22:07
 */
@RestController
@RequestMapping("/json")
public class FastJsonDemo {
    private ObjectMapper objectMapper =  new ObjectMapper();
    @RequestMapping("/test")
    public User test(@RequestBody User user){

        System.out.println(user);
        user.setName("lisi");
     user.setGender(false);
        return user;
    }

}
